﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGiConveyorContext_Internal : OdGiConveyorContext, IDisposable
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGiConveyorContext_Internal(IntPtr cPtr, bool cMemoryOwn)
		{
			this.swigCMemOwn = cMemoryOwn;
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGiConveyorContext_Internal obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGiConveyorContext_Internal()
		{
			this.Dispose();
		}

		public virtual void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGiConveyorContext_Internal(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		HandleRef OdGiConveyorContext.GetCPtr()
		{
			return new HandleRef(this, GlobalsPINVOKE.OdGiConveyorContext_Internal_OdGiConveyorContext_GetCPtr(this.swigCPtr.Handle));
		}

		public virtual OdGiContext giContext()
		{
			OdGiContext result = (OdGiContext)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiConveyorContext_Internal_giContext(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiSubEntityTraits subEntityTraits()
		{
			OdGiSubEntityTraits result = (OdGiSubEntityTraits)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiConveyorContext_Internal_subEntityTraits(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiSubEntityTraitsData effectiveTraits()
		{
			OdGiSubEntityTraitsData result = new OdGiSubEntityTraitsData(GlobalsPINVOKE.OdGiConveyorContext_Internal_effectiveTraits(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setEffectiveTraits(OdGiSubEntityTraitsData traits, OdGeVector3d fillNormal)
		{
			GlobalsPINVOKE.OdGiConveyorContext_Internal_setEffectiveTraits__SWIG_0(this.swigCPtr, OdGiSubEntityTraitsData.getCPtr(traits), OdGeVector3d.getCPtr(fillNormal));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setEffectiveTraits(OdGiSubEntityTraitsData traits)
		{
			GlobalsPINVOKE.OdGiConveyorContext_Internal_setEffectiveTraits__SWIG_1(this.swigCPtr, OdGiSubEntityTraitsData.getCPtr(traits));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual bool effectivelyVisible()
		{
			bool result = GlobalsPINVOKE.OdGiConveyorContext_Internal_effectivelyVisible(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiDrawableDesc currentDrawableDesc()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiConveyorContext_Internal_currentDrawableDesc(this.swigCPtr);
			OdGiDrawableDesc result = (intPtr == IntPtr.Zero) ? null : new OdGiDrawableDesc(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiDrawable currentDrawable()
		{
			OdGiDrawable result = (OdGiDrawable)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiConveyorContext_Internal_currentDrawable(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiViewport giViewport()
		{
			OdGiViewport result = (OdGiViewport)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiConveyorContext_Internal_giViewport(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGsView gsView()
		{
			OdGsView result = (OdGsView)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiConveyorContext_Internal_gsView(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void onTraitsModified()
		{
			GlobalsPINVOKE.OdGiConveyorContext_Internal_onTraitsModified(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void onTextProcessing(OdGePoint3d arg0, OdGeVector3d arg1, OdGeVector3d arg2)
		{
			GlobalsPINVOKE.OdGiConveyorContext_Internal_onTextProcessing(this.swigCPtr, OdGePoint3d.getCPtr(arg0), OdGeVector3d.getCPtr(arg1), OdGeVector3d.getCPtr(arg2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual bool regenAbort()
		{
			bool result = GlobalsPINVOKE.OdGiConveyorContext_Internal_regenAbort(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiPathNode currentGiPath()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiConveyorContext_Internal_currentGiPath(this.swigCPtr);
			OdGiPathNode result = (intPtr == IntPtr.Zero) ? null : new OdGiPathNode(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiDeviation worldDeviation()
		{
			OdGiDeviation_Internal result = new OdGiDeviation_Internal(GlobalsPINVOKE.OdGiConveyorContext_Internal_worldDeviation(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiDeviation modelDeviation()
		{
			OdGiDeviation_Internal result = new OdGiDeviation_Internal(GlobalsPINVOKE.OdGiConveyorContext_Internal_modelDeviation(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiDeviation eyeDeviation()
		{
			OdGiDeviation_Internal result = new OdGiDeviation_Internal(GlobalsPINVOKE.OdGiConveyorContext_Internal_eyeDeviation(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual uint drawContextFlags()
		{
			uint result = GlobalsPINVOKE.OdGiConveyorContext_Internal_drawContextFlags(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		protected bool swigCMemOwn;

		public enum ConveyorContextFlags
		{
			kSpatialFilterSimplPline = 1,
			kSpatialFilterSimplNurbs,
			kSpatialFilterSimplText = 4,
			kSpatialFilterSimplShape = 8,
			kSpatialFilterSimplAll = 15,
			kEmbranchmentSimplText,
			kEmbranchmentSimplNurbs = 32,
			kEmbranchmentSimplAll = 48,
			kConveyorSimplAll = 63,
			kPlineMarkers,
			kForceMarkersOnModified = 128,
			kPolylineMarkers = 256,
			kPlineAllowArcProc = 512,
			kTestMode = 1024
		}
	}
}
